<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        body{
            perspective: 1200px;
        }

        .content{
            display: inline-block;
            width: 200px;
            height: 200px;
            position: relative;
            left: 300px;
            top: 200px;
            transform-style: preserve-3d;
        }

        .box{
            display: inline-block;
            width: 200px;
            height: 200px;
            position: absolute;
        }
        .content:hover .red{
            background-color: red;
            transform: translate3d(0px,0px,100px);
            transition-delay: 5s;
        }

        .content:hover .yellow{
            background-color: yellow;
            transform: rotateX(90deg) translate3d(0px,0px,100px);
            transition-delay: 2s;
        }

        .content:hover .blue{
            background-color: blue;
            transform: rotateY(90deg) translate3d(0px,0px,100px);
            transition-delay: 3s;
        }

        .content:hover .green{
            background-color: green;
            transform: rotateY(-90deg) translate3d(0px,0px,100px);
            transition-delay: 4s;
        }

        .content:hover .darkmagenta{
            background-color: darkmagenta;
            transform: translate3d(0px,0px,-100px);
            transition-delay: 1s;
        }

        .orange{
            background-color: orange;
        }
        .content:hover .orange{
            transform:rotateX(-90deg) translate3d(0px,0px,100px);
        }
        .content:hover div{
            opacity: 0.5;
            transition: all 1s;
        }
    </style>
</head>
<body>
<div class="content">
    <div class="box red"></div>
    <div class="box yellow"></div>
    <div class="box blue"></div>
    <div class="box green"></div>
    <div class="box darkmagenta"></div>
    <div class="box orange"></div>
</div>
</body>
</html>